package com.example.design_pattern.builder;

/**
 * 导演者
 */
public class Director {

    private DialogBuiler dialogBuiler;

    public Director(DialogBuiler dialogBuiler) {
        this.dialogBuiler = dialogBuiler;
    }

    public Dialog construct(String title, String msg, int btn1, int btn2){
        return dialogBuiler.
                buildTitle(title).
                buildMessage(msg).
                buildPositiveButton(btn1).
                buildNavagationButton(btn2).create();
    }
}
